'''
    Holds utility functions need across the different components
'''
import os

def calculate_file_uid(filename):
    """This is a basic function. Right now only returns the file size. For logs they very unlikely to 
    be the same if a log has been rotated. A better function would be an md5sum"""
    uid = None
    if filename:
        try:
            uid = str(os.stat(filename).st_size)
        except OSError:
            uid = None
    return uid
    
